<?xml version="1.0" encoding="windows-1252"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui">
    <h:head>

    </h:head>
    <h:body>

        <ui:composition template="WEB-INF/facelets/Template.xhtml">
            <ui:define name="content">
                <p:panel header="#{UserBean.user.username}'s profile" footer="Something here?">
                    <h:outputText value="Username: #{UserBean.user.username}" />
                    <br/>
                    <h:outputText value="Email: #{UserBean.user.email}" />
                    <br/>
                    <h:outputText value="Rank: #{UserBean.user.rank}" />
                    <br/>
                    <br/>
                    <p:dataTable var="torrent" value="#{SearchBean.getUsersTorrents(UserBean.user)}">

                        <p:column sortBy="#{torrent.name}">
                            <f:facet name="header">
                                <h:outputText value="Uploaded torrents:" />
                            </f:facet>
                            <h:outputText value="#{torrent.name}" />
                        </p:column>

                        <p:column sortBy="#{torrent.date}">
                            <f:facet name="header">
                                <h:outputText value="Date of upload" />
                            </f:facet>
                            <h:outputText value="#{torrent.date}" />
                        </p:column>

                    </p:dataTable>
                </p:panel>
            </ui:define>
        </ui:composition>

    </h:body>
</html>

